<?php
/**
 *      [迷你云] (C)2009-2012 南京恒为网络科技.
 *   软件仅供研究与学习使用，如需商用，请访问www.miniyun.cn获得授权
 * 
 */
?>
<?php $this->pageTitle="用户管理"; ?>
<div class="icon32" id="icon-users"><br>
</div>
<?php $arr = Yii::app()->params['helpDocument'];?>
<h2>用户管理<a target="<?php echo $arr['target']?>" href="<?php echo $arr['manageUser']?>"><?php echo $arr['img']?></a>
 <a class="add-new-h2"
	href="<?php echo(Yii::app()->createUrl("adminUserPanel/create"));?>">添加用户</a>
</h2>
<?php
$message = Yii::app()->request->getParam("message");
if(isset($message) && $message!=''){
	echo("<div id='message' class='updated'><p>".$message."。</p></div>");
}
?>
<?php
$allClass = "";
$adminClass = "";
$disabledClass="";

if(Yii::app()->request->getParam("isAdmin")!=''){
	$adminClass = "current";
}
if(Yii::app()->request->getParam("disabled")!=''){
	$disabledClass = "current";
}
if($adminClass=="" && $disabledClass==""){
	$allClass = "current";
}
?>
<ul class="subsubsub">
	<li class="all"><a class="<?php echo($allClass);?>"
		href="<?php echo(Yii::app()->createUrl("adminUserPanel/index"));?>">全部
	<span class="count">(<?php echo($count);?>)</span></a> |</li>
	<li class="administrator"><a class="<?php echo($adminClass);?>"
		href="<?php echo(Yii::app()->createUrl("adminUserPanel/index&isAdmin=1"));?>">管理员
	<span class="count">(<?php echo($adminCount);?>)</span></a> |</li>
	<li class="administrator"><a class="<?php echo($disabledClass);?>"
		href="<?php echo(Yii::app()->createUrl("adminUserPanel/index&disabled=1"));?>">冻结的用户
	<span class="count">(<?php echo($disabledCount);?>)</span></a></li>
</ul>
<?php
$form=$this->beginWidget('CActiveForm', array());
$provider = $model->getDataProvider();
$count = count($provider->getData());
?>
<?php echo $form->hiddenField($model,"action");?>
<p class="search-box"><?php echo $form->textField($model,"searchKey");?>
<?php echo CHtml::submitButton("搜索用户",array("class"=>"button","name"=>"search")); ?>

<?php if($count>0){?>
<div class="tablenav top">
<div class="alignleft actions"><?php echo $form->dropDownList($model,"baseAction",$model->baseActionArray) ?>
<?php echo CHtml::submitButton("应用",array("class"=>"button-secondary action","name"=>"baseAction")); ?></div>

<div class="alignleft actions"><?php echo $form->dropDownList($model,"roleAction",$model->roleActionArray) ?>
<?php echo CHtml::submitButton("更改",array("class"=>"button-secondary action","name"=>"roleAction")); ?>
</div>
<?php }?> <?php $this->widget('CMiniyunGridView', array(
	'id'           => 'user-grid',
	'dataProvider' => $provider,
	'model'        => new UserBase(),
	'view'         => 'miniyunGridView',
)); ?> <?php $this->endWidget(); ?></div>
<script
	type='text/javascript'
	src='<?php echo Yii::app()->request->baseUrl; ?>/statics/javascript/userList.js'></script>
